package com.lxitedu.demo;

import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.lxitedu.MyModule;

public class Client {

	private  Service service;

	@Inject
	public Client(@Good  Service service) {
		this.service = service;
	}
	
	/*@Inject
	public void setService(Service service){
		this.service = service;
		
	}
*/
	public void go() {
		service.go();
	}
	public static void main(String[] args) {

	    Injector injector = Guice.createInjector(new MyModule());
	     Service player = injector.getInstance(Service.class);
	    player.go();
	    }
}